import Text from './text'


// 组件列表
const components = [
  Text
]

const install = function (Vue) {
  if (install.installed) return
  install.installed = true
  components.map(component => Vue.component(component.name, component))
}

if (typeof window !== 'undefined' && window.Vue) {
  install(window.Vue)
}

let register_components_object = {};
components.forEach(item => {
  register_components_object[item.name] = item
})

export {
  register_components_object
}

export default {
  install
}
